package core2.ch04database;

import java.util.Date;
import java.util.Properties;

//import com.jnetdirect.jsql.JSQLException;     ��ҪJSQL ��
//import com.jnetdirect.jsql.Util;

public class Test {
	private static String a = "1123456789 A 43476566777123344565663                                  0000   2                                                                                                                                                                                                                                                                                 ";
    private static String b = "2123456789 A 63734197743412123766566                                  0100      2                                                                                                                                                                                                                                                                              ";
    private static String c = "3123456789 A 43245454354554517776232                                  0000  2                                                                                                                                                                                                                                                                                  ";
   // private static String d = "0123456789 A 11849298356560000000000    4743425A                      000028987694635654             0        3D2121252D2929151D111B1F0307030F0B777B7F                                                                                                                                                                                                         ";
    private static String d = "0123456789 A 11849298356560000000000    4743425A                      000021187694635654             0        3D2121252D2929151D111B1F0307030F0B777B7F                                                                                                                                                                                                         ";
    
    //new Date(new Long("1187694635654").longValue()).toString()

    //new Date(new Long("8987694635654").longValue()).toString()
    
    private static String e = "3123456789 A 43245454354554517776232                                  0000  2                                                                                                                                                                                                                                                                                  ";
    private static String f = "2123456789 A 63734197743412123766566                                  0100      2                                                                                                                                                                                                                                                                              ";
	
    public static void main(String[] args) {
    	String s10 = "";
        String s11 = "JSQL";
        for(int i1 = 0; i1 < 2; i1++)
        {
            for(int j1 = 0; j1 < 10; j1++)
            {
                char c1 = (char)(48 + j1);
                s10 = s10 + c1;
            }

        }

        try
        {
            Class class1 = null;
            try
            {
                class1 = Class.forName("JSQLLicense");
            }
            catch(ClassNotFoundException classnotfoundexception)
            {
                class1 = Class.forName("com.jnetdirect.license.JSQLLicense");
            }
            Properties properties = (Properties)class1.newInstance();
            String s6 = properties.getProperty("", "");
            String s8 = properties.getProperty("");
            String s7 = properties.getProperty("", "1");
            s8 = s8.substring(10, s8.length());
            char c2 = s8.charAt(1);
            String s9 = (String)properties.setProperty("license", "");
            char c3 = s7.charAt(0);
            c3 += 'A';
            c3 = s8.charAt(74);
            String s12 = s9.substring(65);
            s12 = s12.trim();
            if(c2 == 'A')
                s12 = s8.substring(65, 88);
            else
                s12 = s8.substring(65);
            s12 = s12.trim();
            char c4 = s7.charAt(0);
            c3 += 'Z';
            char c5 = s8.charAt(60);
            char c6 = s8.charAt(61);
            if(c2 == 'A')
            {
                String s13 = s8.substring(30, 38);
                //s13 = _mthnew(s13);
                if(!s13.equals(s11))
                {
              //      _fldgoto = -1;
                //    String s = "Invalid license. The license found was id [" + s13 + "] license. ";
                 //   JSQLException.makeFromDriverError(null, null, s, null, false);
                }
            }
            System.out.println("s12: "+s12);
            
            Long long1 = new Long(s12);
            Date date = new Date(long1.longValue());
            Date date1 = new Date(System.currentTimeMillis());
            if(date1.before(date))
            {
                Integer _fldgoto = 0;
                try
                {
                    String s18 = s8.substring(91, 95).trim();
                    _fldgoto = Integer.parseInt(s18);
                }
                catch(Exception exception1) { }
                String s19 = "JSQLLicense" + " Trial license - expires on:" + date.toString();
//                Util.println(s19);
                //jsqlconnection.log(s19);
            }
        }catch(Exception e1){
        	e1.printStackTrace();
        }
        
    }

}
